package com.example.mapper;

import com.example.entity.Messages;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author: tobed
 * @date: 2022/11/18
 * @time: 14:08
 */
@Mapper
public interface MessagesMapper extends BaseMapper<Messages>{

    /*查询个人消息*/
    List<Messages> selectMessages(@Param("userId") Integer userId,@Param("type") Integer type);

    /*查询未读消息数量*/
    int countNoRead(@Param("userId") Integer userId,@Param("type") Integer type);

    /*清理个人消息*/
    int cleanNoRead(@Param("userId") Integer userId,@Param("type") Integer type);

    /*清理个人消息*/
    int updatStatus(@Param("id") Integer id);
}
